レプリケート・データ・ストアの設定を表示できます。
レプリケート・データ・ストアの設定をttIsqlプロンプトから表示するには、repschemesコマンドを使用します。
Replication Scheme repl.propagator: Element: a Type: Table repl.tab Master Store: centralds On finance Transmit Durable Subscriber Store: propds On nethandler Element: b Type: Table repl.tab Propagator Store: propds On nethandler Transmit Durable Subscriber Store: backup2ds On backupsystem2 Subscriber Store: backup1ds On backupsystem1 Store: backup2ds On backupsystem2 Port: (auto) Log Fail Threshold: (none) Retry Timeout: 120 seconds Return Service Wait Time: 10 seconds Twosafe Local Commit Action on Timeout: No Action Return Service Failure Policy: (none) Store: propds On nethandler Port: (auto) Log Fail Threshold: (none) Retry Timeout: 120 seconds Return Service Wait Time: 10 seconds Twosafe Local Commit Action on Timeout: No Action Return Service Failure Policy: (none) Store: backup1ds On backupsystem1 Port: (auto) Log Fail Threshold: (none) Retry Timeout: 120 seconds Return Service Wait Time: 10 seconds Twosafe Local Commit Action on Timeout: No Action Return Service Failure Policy: (none) 1 replication scheme found.
レプリケート・データ・ストアの設定をコマンドラインから表示するには、-showconfigオプションを指定してttRepAdminユーティリティを使用します。
ttRepAdmin -showconfig -dsn masterDSN例5.12に、「伝播スキーム」で説明されているレプリケーション・スキームによって設定された伝播済データ・ストアからの設定出力を示します。
> ttRepAdmin -showconfig -dsn centralds Self host "finance", port auto, name "centralds", LSN 0/155656, timeout 120, threshold 0 List of subscribers ----------------- Peer name Host name Port State Proto ---------------- ------------------------ ------ ------- ----- propds nethandler Auto Start 10 Last Msg Sent Last Msg Recv Latency TPS RecordsPS Logs ------------- ------------- ------- ------- --------- ---- 0:01:12 - 19.41 5 52 2 List of tables and subscriptions -------------------------------- Table details ------------- Table : repl.tab Timestamp updates : - Master Name Subscriber Name ----------- ------------- centralds propds Table details ------------- Table : repl.tab Timestamp updates : - Master Name Subscriber name ----------- ------------- propds backup1ds propds backup2dsList of subscribersフィールドの意味については、例5.10を参照してください。Table detailsフィールドには、表およびそのマスター(送信者)とサブスクライバのデータ・ストアが表示されます。
レプリケート・データ・ストアの設定をプログラムから表示するには、次のSQL SELECT文を使用して、TTREP.TTSTORES、TTREP.REPSTORES、TTREP.REPPEERS、SYS.MONITOR、TTREP.REPELEMENTSおよびTTREP.REPSUBSCRIPTIONS表を問い合せます。
SELECT t.host_name, t.rep_port_number, t.tt_store_name, s.peer_timeout, s.fail_threshold FROM ttrep.ttstores t, ttrep.repstores s WHERE t.is_local_store = 0X01 AND t.tt_store_id = s.tt_store_id; SELECT t1.tt_store_name, t1.host_name, t1.rep_port_number, p.state, p.protocol, p.timesend, p.timerecv, p.latency, p.tps, p.recspersec, t3.last_log_file - p.sendlsnhigh + 1 FROM ttrep.reppeers p, ttrep.ttstores t1, ttrep.ttstores t2, sys.monitor t3 WHERE p.tt_store_id = t2.tt_store_id AND t2.is_local_store = 0X01 AND p.subscriber_id = t1.tt_store_id AND (p.state = 0 OR p.states = 1); SELECT ds_obj_owner, DS_OBJ_NAME, t1.tt_store_name,t2.tt_store_name FROM ttrep.repelements e, ttrep.repsubscriptions s, ttrep.ttstores t1, ttrep.ttstores t2 WHERE s.element_name = e.element_name AND e.master_id = t1.tt_store_id AND s.subscriber_id = t2.tt_store_id ORDER BY ds_obj_owner, ds_obj_name;レプリケーション保持LSNを取得するには、ttBookmarkプロシージャを使用します(「プログラムから: ttBookMarkプロシージャ」を参照)。
「伝播スキーム」で説明されているレプリケーション・スキームによって設定されたデータ・ストアに対する前述の問合せの出力例は、次のようになります。
< finance, 0, centralds, 120, 0 > < propds, nethandler, 0, 0, 7, 1004378953, 0, -1.00000000000000, -1, -1, 1 > < repl, tab, centralds, propds > < repl, tab, propds, backup1ds > < repl, tab, propds, backup2ds >最初の行内の最初の3列(レプリケーション保持LSNは除く)については、例5.6を参照してください。4つ目の列は、データ・ストアがメッセージを送信する前に別のデータ・ストアからのレスポンスを待機する時間を定義するTIMEOUT値です。最後の列は、ログ障害しきい値(「ログ障害しきい値の設定」を参照)です。
2行目の行については、例5.10を参照してください。最後の3つの列には、レプリケート表およびそのマスター(送信者)とサブスクライバ(受信者)のデータ・ストアの名前が表示されます。